<script setup lang="ts">
import { ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
//引入VueOfficePdf组件
import VueOfficePdf from '@vue-office/pdf'
//引入相关样式
import '@vue-office/docx/lib/index.css'
import { getInformationEtc } from '@/api/realName'
import { useAppStore } from '@/store/modules/app'

const appStore = useAppStore()

const userInfo = appStore.getUserInfo
const { push } = useRouter()
const route = useRoute()

const loading = ref(true)

const pdfUrl = ref('')
pdfUrl.value = route.query.docFileUrl as string
const init = () => {
  getInformationEtc({
    username: userInfo.username
  })
}
init()
</script>

<template>
  <div style="padding-bottom: 60px">
    <VueOfficePdf :src="pdfUrl" />
  </div>
</template>

<style scoped lang="less">
.btnBox {
  padding: 4px 16px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
}
.documentBox {
  width: 100vw;
  padding: 16px;
  overflow: hidden;
  box-sizing: border-box;

  padding-bottom: 110px;
  .confirmBox {
    position: fixed;
    padding: 16px;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: #fff;
  }
}
.documentWrapper {
  width: 100%;
}
</style>
